//
//  EnterprisesViewCell.m
//  XTCloud
//
//  Created by QA on 2018/2/26.
//  Copyright © 2018年 ShangHai HaoLei Software Technology Co., Ltd. All rights reserved.
//

#import "EnterprisesViewCell.h"

@implementation EnterprisesViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier index:(NSInteger)index
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.opaque = YES;
        // Initialization code
        NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"EnterprisesViewCell" owner:self options:nil];
        self = [topLevelObjects objectAtIndex:index];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        //卡片阴影
        if(index>=1){
            self.layer.shadowColor = [UIColor blackColor].CGColor;//shadowColor阴影颜色
            self.layer.shadowOffset = CGSizeMake(0,3);//shadowOffset阴影偏移,x向右偏移4，y向下偏移4，默认(0, -3),这个跟shadowRadius配合使用
            self.layer.shadowOpacity = 0.05;//阴影透明度，默认0
            self.layer.shadowRadius = 2;//阴影半径，默认3
            self.layer.masksToBounds = NO;
        }
    }
    return self;
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.opaque = YES;
        // Initialization code
        NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"EnterprisesViewCell" owner:self options:nil];
        self = [topLevelObjects objectAtIndex:0];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return self;
}

- (void)setFrame:(CGRect)frame
{
    frame.origin.x += 8;
    frame.size.width = SuperWidth - 16;
    [super setFrame:frame];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
}

@end
